package com.joe.dom4j;

import java.util.StringTokenizer;

public class Tokenizer {
	public static void main(String[] args) {

		String strCode = "111111111:s03:999_US01;112222222:s03:s005;333333333:s05:2222;44444444444:s09:s004;";
		String b = "";

		StringTokenizer st = new StringTokenizer(strCode, ";");

		String[] items = new String[st.countTokens()];

		int count = 0;

		while (st.hasMoreTokens()) {
			items[count] = st.nextToken();
			String[] str_abc = items[count].split(":");
			for (int i = 0; i < str_abc.length; i++) {
				System.out.println(str_abc[i]);
			}
			count++;
		}
		System.out.println(".....");
		for(int i=0;i<items.length;i++){
			String str = items[i].split(":")[0];
			System.out.println(str);
		}
	}
}
